{layout name="layout" /}
<h3>
    分层控制器
    <div class="layui-form-item" style="display: inline-block;">
        <div class="layui-input-block">
            <a href="{:url('eventcontroller')}?file=1&mokuai={$mokuai}&event_name={$name}" class="layui-btn" lay-submit lay-filter="basecontroller">生成公共控制器文件</a>
        </div>
    </div>
</h3>
<br>
<textarea readonly style="width: 100%; height: 550px; font-family: &quot;Courier New&quot;; font-size: 12px; line-height: 1.5;">
namespace app\{$mokuai}\event;

class {$name}

{
    public function insert()
    {
        return 'insert';
    }

    public function update($id)
    {
        return 'update:'.$id;
    }

    public function delete($id)
    {
        return 'delete:'.$id;
    }
}

</textarea>